package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.dto.MidDto;
import com.itheima.entity.UserLinkNotice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 51585
 * @description 针对表【user_link_notice】的数据库操作Mapper
 * @createDate 2022-11-03 13:46:07
 * @Entity com.itheima.entity.UserLinkNotice
 */
@Mapper
public interface UserLinkNoticeMapper extends BaseMapper<UserLinkNotice> {

    /**
     * 查找有未读通知的用户
     *
     * @return 用户id集合
     */
    List<String> unreadUsers();

    /**
     * 统计用户收到通知数
     *
     * @param userIdList 用户id集合
     * @return list
     */
    List<MidDto> totalAcceptNoticeNum(@Param("list") List<String> userIdList);
}




